<template>
    <view>
        <Header special="true" :background="background" :title="title" />
<!--        <CheckScreen :screenList="screenList" :screenIndex="screenIndex" @checkChange="checkChange" />-->
        <view class="main" :style="{'min-height': `${noBarHeight - (footerRail ? 70 : 50)}px`}">
            <scroll-view v-if="dataList.length" class="pro_main" scroll-y="true" :style="{'height': `${noBarHeight - (footerRail ? 86 : 66)}px`}" :enhanced="true" :show-scrollbar="false">
                <ImBlack
                    @onCclick="navImInfo"
                    v-for="(item, index) in 16"
                    :key="index"
                    :dataDetail="item"
                />
            </scroll-view>
            <view class="sky_bg" v-else :style="{'height': `${noBarHeight - (footerRail ? 86 : 66)}px`}">
                <img class="bg_img" src="https://xunlantech.oss-cn-hangzhou.aliyuncs.com/source/static/image/skyBg_icon.png" />
                <text class="sky_text">暂无对接消息</text>
            </view>
        </view>
        <NavBar :activeIndex="2"/>
    </view>
</template>
<script>
var app = getApp()
import Header from "@/components/Header.vue"
import NavBar from "@/components/NavBar.vue";
import ImBlack from "@/components/ImBlock.vue";
export default ({
    name: "im",
    data() {
        return {
            background: 'linear-gradient(0, #5162FD, #8E4EF7)',
            title: '对接企业',
            noBarHeight: app.globalData.noBarHeight,
            footerRail: app.globalData.footerRail,
            dataList: [1, 2]
        }
    },
    components: {
        NavBar,
        Header,
        ImBlack
        // CheckScreen,
        // ProBlack
    },
    methods: {
        navImInfo(e) {
            uni.navigateTo({
                url: `../../subpages/pages/imInfo/imInfo?userId=${e?.id || 0}`
            })
        }
    }
})
</script>

<style scoped lang="scss">
.main {
    flex-direction: column;
    width: 100%;
    background: #f8f8f8;
    display: flex;
    box-sizing: border-box;
    align-items: center;
    padding: 10rpx 0;
    .pro_main {
        width: 100%;
        padding: 12rpx 12rpx 0;
        box-sizing: border-box;
    }
    .sky_bg {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        .bg_img {
            width: 148rpx;
            height: 126rpx;
        }
        .sky_text {
            height: 40rpx;
            font-size: 28rpx;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            color: #9B9B9B;
            line-height: 40rpx;
        }
    }
}
</style>
